package com.zyy.meetObject2;

public class Bank {
    private Customer[] customers;
    private int numberOfCustomer;

    public Bank() {
        customers = new Customer[10];
    }
    public void addCustomer(String f,String l){
        Customer cust = new Customer(f,l);
        customers[numberOfCustomer] = cust;
        numberOfCustomer++;
    }

    public Customer getCustomers(int index) {
        if(index >= numberOfCustomer || index < 0){
            return null;
        }else{
            return customers[index];
        }
    }

    public int getNumberOfCustomer() {
        return numberOfCustomer;
    }
}
